package chap6;

public class ExceptionDemo4 {
	static void throwsmethod() throws IllegalAccessException{
		System.out.println("inside method");
		throw new IllegalAccessException("demo4");
	}
	public static void main(String[] args) {
		try{
			throwsmethod();
		}
		catch(IllegalAccessException e){
			System.out.println("caught "+e);
		}
		
	}

}
